# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

num=input("输入一个自然数:\n")
print(sum(map(int,num)))